home *** CD-ROM | disk | FTP | other *** search
-
-
-
-
-
-
-
-
- DD.COM Version 2.00
-
-
- Author: Robert C. Evans, Jr.
- (C)Copyright P. C. Systems Consultants, 1986
- All Rights Reserved
-
-
- Directory of Duplicates, hereafter referred to as DD, is a
- program written in MicroSoft C which allows the user to
- perform a directory search for duplicate files across all
- subdirectories.
-
- DD allows you to quickly check for duplication of files on
- your fixed disk. It becomes necessary to do this since
- grouping in subdirectories lends itself to retaining multiple
- copies of the same file. The advanced methods used in DD
- allow for extremely fast execution, even though a run time of
- several minutes would be a vast improvement over than listing
- all files on the disk and manually checking for duplication.
-
- The syntax of the command is:
-
- DD [-bdefh] <drive:pathname>
-
- where: DD = program name
- - = program option designator
- a = ANSI display console
- b = DOS display console
- d = check for duplicate directory names
- e = display only exact duplicates
- f = format output for Batch file usage
- h = display help and program information
- m = format output for Batch file usage (w/marks)
- drive = any valid DOS drive specification
- pathname = any valid DOS path
-
- All arguments are optional and will be explained further as we
- go along.
-
-
-
-
-
-
-
- The simplest form of usage for DD is to change to the
- directory which will serve as the root directory for the
- search, and then type:
-
- DD
-
- After pressing the enter key, a program heading will appear
- similar to this:
-
- Directory of Duplicates by Robert C. Evans, Jr.
- (C) Copyright 1986 P. C. Systems Consultants
-
- Next would be either a statement that all directory
- information is being read, or the name of a particular
- directory and its path as it is being read.
-
- At this point, directory information from the drive is being
- read and assimilated into a binary tree for comparison
- purposes. After all directory information has been read and
- processed, the duplicates will be displayed in this format:
-
- FILENAME.EXT was found in N directories:
- MM/DD/YY HH:MM:SS #BYTES ATTRIB DIRECTORY
-
- where FILENAME.EXT is filename of file found more than once in
- separate subdirectories, N is the number of times the file was
- found, MM/DD/YY HH:MM:SS is the date and time the file was
- last modified, #BYTES is the size of the file in bytes, ATTRIB
- is the files attributes, and DIRECTORY is the directory which
- the file was found in. The first line, which gives the name
- of the file and number of duplicates, appears once for each
- file found which has duplicates. The following line will be
- repeated once for each duplicate found.
-
- The time is given in 24 hour format and the attributes are
- reported as:
- R = Read Only
- H = Hidden
- S = System
- D = Directory
- A = Archive
-
- This output format is the default. You may also specify a
- format which is useful for redirecting to a file and creating
- a Batch file for direct manipulation of the files. There are
- two types which fit into this category. They are chosen by
- specifying either the F or the M option.
-
-
-
-
-
-
-
- The F option lists all the duplicates found in this format:
-
- drive:\pathname\filename.ext
-
- with the exception that 'drive:' is only output if it was
- specified on the command line, but more about that later.
- '\pathname\' is the directory that 'filename.ext' was found
- in. This line is output once for each duplicate.
-
- The M option lists all the duplicates found in this format:
-
- * drive:\pathname\filename.ext #
-
- This is the same as the F option but provides you with two
- unique marks on each line so that you may redirect this the
- output to a file, load the file into a word processing
- program, and perform a global search and replacement of all
- the *'s with one string and all the #'s with another.
-
- These marks do not seem extremely useful at first glance, but
- consider the scenario which drove me to writing the original
- version of this program. Having purchased an IBM XT with a 10
- megabyte fixed disk, I was sure that I would always have and
- abundance of on-line storage, but as most owners of fixed
- disks know, it just isn't so. After collecting around 1500+
- files in 50+ directories occupying all but 128 bytes of my 10
- megabyte drive (a poor state affairs), I decided to do some
- file management after losing an hours worth of work using a
- program which did not allow for Disk Full errors. It would
- certainly have expedited the house cleaning process if I had a
- file with the names of all duplicates containing place markers
- which I could globally replace with COPY and/or DEL statements
- so that I could create a .BAT which would free some of the
- wasted space.
-
- The safest usage of replacing the -F format special symbols
- with DOS commands is to use DD to generate a listing of the
- duplicates out to the printer. Then run DD with the -F format
- and redirect the output to a file with a .BAT extension, which
- you can then selectively edit to achieve the desired results.
- You would be wise to inspect each file you are considering
- deleting before doing such.
-
- The Batch file method of cleaning up is certainly much faster
- than typing in 100 DEL statements (yes, I had over 100
- duplicates, so what if I kept an over abundance of multiple
- copies of my source code, I thought that 10 meg would never
- run out. HA!).
-
-
-
-
-
-
-
- Should you want to check for duplicate sub-directory names on
- a disk, you may specify the D option. This would treat the
- sub-directory name as a filename for comparison purposes. A
- file which is named 'DOCUMENT.' would produce a match with a
- sub-directory named 'DOCUMENT', no matter what path these two
- directory entries lie in. You will notice a difference in the
- number of files compared when DD is executed twice under the
- exact same conditions if one time the D option is utilized and
- the other time it is not.
-
- In the event that you do not want to list all of the files
- sharing only a common name, you may specify the E option,
- which will compare the files name, size, date and time. You
- still have the option of choosing either of the format options
- if you wish.
-
- The A and B options allow the user to choose which type of
- screen display routines will be used for displaying the
- program heading and program execution information. Specifying
- the A option states you wish to use the ANSI escape sequences
- The B option is similar with the exception that BIOS output
- routines are utilized. If neither the A or the B options are
- specified, direct screen I/O is utilized. All output routines
- use BIOS calls at some point, so BIOS compatibility is a MUST
- for correct operation of this program. Chances are good,
- however, that DD will still perform correctly on an MS-DOS
- compatible machine.
-
- The H option displays copyright information as well as an
- abridged version of the command syntax and usage.
-
- The DRIVE:PATHNAME option allows you to execute DD from any
- directory while specifying another directory for use as the
- parent or root directory during the file search.
-
- NOTE! In order to force DD to place a Drive designator at the
- beginning of the pathname you must specify one on the command
- line in the DRIVE: option. Displaying the drive searched is
- not the default, since I felt this would be redundant.
-
- Since you may wish to obtain a listing of the duplicate files,
- the filename and subdirectory information is output via the
- DOS function 02H. This allows you to redirect the output to
- either a file or a device, such as the printer. All program
- heading information as well as any error notices will be
- printed directly to the screen and cannot be redirected.
-
-
-
-
-
-
-
- To obtain a printed listing of your duplicated files, you may
- enter:
- DD >PRN
- or DD >LPTx ( where x is 1 or 2 )
-
- To create a file consisting of your duplicated files, you may
- enter:
- DD >filename.ext
-
- where filename is any valid path\filename.ext specification.
-
- To list your duplicated files to the screen without scrolling
- information of the top of the screen, you may enter:
-
- DD | MORE
-
- where | is the symbol used by DOS to 'pipe' output from DD to
- MORE.COM ( a DOS filter ).
-
- On any of the preceding commands, you may supply DD with any
- of the valid command line arguments previously discussed. For
- example, you could list all duplicate files and directories at
- and below the root directory on your C: drive which are exact
- matches using ANSI output and redirect the output to the
- printer by entering:
-
- DD -ade C:\ >PRN
-
- For further information on redirecting/piping output,
- file naming conventions, and DOS filters, consult your DOS
- manual.
-
-
-
-
-
-
-
- NOTE! DD has been thoroughly tested and debugged on an IBM
- PC/XT with an accompanying 10 meg fixed disk, but no warranty
- or liability in any form or manner is implied or suggested.
- You may experience a NOT ENOUGH MEMORY error which simply
- means you have to many files or to little RAM for memory to be
- able to hold all the directory information for your disk.
-
- COPYRIGHT NOTICE! DD.EXE (C) 1986 P. C. Systems Consultants,
- All Rights Reserved. This program is being marketed via the
- ShareWare concept. This notice hereby gives you permission to
- freely copy and exchange this program and its documentation
- with these stipulations:
-
- You may copy and distribute this program freely, provided
- that:
-
- i. No fee is charged for such copying and distribution
- without the prior written consent of Robert Evans on
- behalf of Personal Computer Systems Consultants.
-
- ii. It is distributed ONLY in its original, unmodified
- state which is to include all accompanying files.
-
-
- If you use this program and find it of use, then your
- contribution will be appreciated. You may not use this or any
- other accompanying program in a commercial or government
- organization without paying a registration fee of $10 ($50 for
- bound documentation w/source) which will stimulate the author
- to update and revise this program as needed and to motivate
- him on to developing new software and clothing and feeding his
- eight starving children.
-
- For questions, comments, suggestions or information on any of
- the services available from P. C. Systems Consultants, please
- write to:
- P. C. Systems Consultants
- P. O. Box 1996
- Stone Mountain, GA 30086-1996
-
- Attention: Robert Evans
-
- In closing I would just like to quote Mr. Bartle & Mr. Jaymes in
- saying "Thank you for your support".